-- GENERATED SPELL FOR [Vile Fin Tidehunter] --


function spell0_1768(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_1768', 0, 1)
end

function spell1_1768(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(12748,pUnit)
pUnit:RegisterEvent('Sorts_1768', 5328, 1)
end

function spell2_1768(pUnit, Event) --@Quick Frost Ward,n/a--
pUnit:FullCastSpellOnTarget(4980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1768', 11500, 1)
end

function Sorts_1768(pUnit, Event)
local choix_sorts_1768 = math.random(0, 2)
if choix_sorts_1768 == 0 then
pUnit:RegisterEvent('spell0_1768', 1, 1)
end
if choix_sorts_1768 == 1 then
pUnit:RegisterEvent('spell1_1768', 1, 1)
end
if choix_sorts_1768 == 2 then
pUnit:RegisterEvent('spell2_1768', 1, 1)
end
end

function mob1768_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1768', math.random(1500, 3000), 1)
end

function mob1768_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1768_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1768_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1768, 1, 'mob1768_Action')
RegisterUnitEvent(1768, 2, 'mob1768_Leave')
RegisterUnitEvent(1768, 3, 'mob1768_Kill')
RegisterUnitEvent(1768, 4, 'mob1768_Die')
